def callzte(num:int):
    cnt=0
    while num>1:
        if num%2==0:
            num=num//2
        else:
            num=(3*num+1)//2
        cnt+=1

    return cnt

num=int(input())
print(callzte(num))